package com.kaoshi.employee.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * @TableName employee
 */
@TableName(value ="employee")
@Data
public class Employee implements Serializable {
    private Integer id;

    private String name;

    private Object gender;

    private String employeeNumber;

    private String idNumber;

    private Date idValidityStart;

    private Date idValidityEnd;

    private String ethnicity;

    private String nativePlaceProvince;

    private String nativePlaceDistrict;

    private String householdRegisterType;

    private String householdRegisterProvince;

    private String householdRegisterDistrict;

    private String maritalStatus;

    private String fertilityStatus;

    private String politicalStatus;

    private Integer hasDriverLicense;

    private String healthStatus;

    private String avatarPath;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Employee other = (Employee) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
            && (this.getEmployeeNumber() == null ? other.getEmployeeNumber() == null : this.getEmployeeNumber().equals(other.getEmployeeNumber()))
            && (this.getIdNumber() == null ? other.getIdNumber() == null : this.getIdNumber().equals(other.getIdNumber()))
            && (this.getIdValidityStart() == null ? other.getIdValidityStart() == null : this.getIdValidityStart().equals(other.getIdValidityStart()))
            && (this.getIdValidityEnd() == null ? other.getIdValidityEnd() == null : this.getIdValidityEnd().equals(other.getIdValidityEnd()))
            && (this.getEthnicity() == null ? other.getEthnicity() == null : this.getEthnicity().equals(other.getEthnicity()))
            && (this.getNativePlaceProvince() == null ? other.getNativePlaceProvince() == null : this.getNativePlaceProvince().equals(other.getNativePlaceProvince()))
            && (this.getNativePlaceDistrict() == null ? other.getNativePlaceDistrict() == null : this.getNativePlaceDistrict().equals(other.getNativePlaceDistrict()))
            && (this.getHouseholdRegisterType() == null ? other.getHouseholdRegisterType() == null : this.getHouseholdRegisterType().equals(other.getHouseholdRegisterType()))
            && (this.getHouseholdRegisterProvince() == null ? other.getHouseholdRegisterProvince() == null : this.getHouseholdRegisterProvince().equals(other.getHouseholdRegisterProvince()))
            && (this.getHouseholdRegisterDistrict() == null ? other.getHouseholdRegisterDistrict() == null : this.getHouseholdRegisterDistrict().equals(other.getHouseholdRegisterDistrict()))
            && (this.getMaritalStatus() == null ? other.getMaritalStatus() == null : this.getMaritalStatus().equals(other.getMaritalStatus()))
            && (this.getFertilityStatus() == null ? other.getFertilityStatus() == null : this.getFertilityStatus().equals(other.getFertilityStatus()))
            && (this.getPoliticalStatus() == null ? other.getPoliticalStatus() == null : this.getPoliticalStatus().equals(other.getPoliticalStatus()))
            && (this.getHasDriverLicense() == null ? other.getHasDriverLicense() == null : this.getHasDriverLicense().equals(other.getHasDriverLicense()))
            && (this.getHealthStatus() == null ? other.getHealthStatus() == null : this.getHealthStatus().equals(other.getHealthStatus()))
            && (this.getAvatarPath() == null ? other.getAvatarPath() == null : this.getAvatarPath().equals(other.getAvatarPath()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
        result = prime * result + ((getEmployeeNumber() == null) ? 0 : getEmployeeNumber().hashCode());
        result = prime * result + ((getIdNumber() == null) ? 0 : getIdNumber().hashCode());
        result = prime * result + ((getIdValidityStart() == null) ? 0 : getIdValidityStart().hashCode());
        result = prime * result + ((getIdValidityEnd() == null) ? 0 : getIdValidityEnd().hashCode());
        result = prime * result + ((getEthnicity() == null) ? 0 : getEthnicity().hashCode());
        result = prime * result + ((getNativePlaceProvince() == null) ? 0 : getNativePlaceProvince().hashCode());
        result = prime * result + ((getNativePlaceDistrict() == null) ? 0 : getNativePlaceDistrict().hashCode());
        result = prime * result + ((getHouseholdRegisterType() == null) ? 0 : getHouseholdRegisterType().hashCode());
        result = prime * result + ((getHouseholdRegisterProvince() == null) ? 0 : getHouseholdRegisterProvince().hashCode());
        result = prime * result + ((getHouseholdRegisterDistrict() == null) ? 0 : getHouseholdRegisterDistrict().hashCode());
        result = prime * result + ((getMaritalStatus() == null) ? 0 : getMaritalStatus().hashCode());
        result = prime * result + ((getFertilityStatus() == null) ? 0 : getFertilityStatus().hashCode());
        result = prime * result + ((getPoliticalStatus() == null) ? 0 : getPoliticalStatus().hashCode());
        result = prime * result + ((getHasDriverLicense() == null) ? 0 : getHasDriverLicense().hashCode());
        result = prime * result + ((getHealthStatus() == null) ? 0 : getHealthStatus().hashCode());
        result = prime * result + ((getAvatarPath() == null) ? 0 : getAvatarPath().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", gender=").append(gender);
        sb.append(", employeeNumber=").append(employeeNumber);
        sb.append(", idNumber=").append(idNumber);
        sb.append(", idValidityStart=").append(idValidityStart);
        sb.append(", idValidityEnd=").append(idValidityEnd);
        sb.append(", ethnicity=").append(ethnicity);
        sb.append(", nativePlaceProvince=").append(nativePlaceProvince);
        sb.append(", nativePlaceDistrict=").append(nativePlaceDistrict);
        sb.append(", householdRegisterType=").append(householdRegisterType);
        sb.append(", householdRegisterProvince=").append(householdRegisterProvince);
        sb.append(", householdRegisterDistrict=").append(householdRegisterDistrict);
        sb.append(", maritalStatus=").append(maritalStatus);
        sb.append(", fertilityStatus=").append(fertilityStatus);
        sb.append(", politicalStatus=").append(politicalStatus);
        sb.append(", hasDriverLicense=").append(hasDriverLicense);
        sb.append(", healthStatus=").append(healthStatus);
        sb.append(", avatarPath=").append(avatarPath);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}